sqlalchemy filter date today

204

sqlalchemy filter date today -

from sqlalchemy import func
from datetime import date

my_data = session.query(MyObject).filter(
    func.date(MyObject.date_time) == date.today()
).all()

Comments

Submit
0 Comments